Fix bad format string in ext_authz trace log#18492
Conversation
Signed-off-by: Michael Leuchtenburg <mleuchtenburg@google.com>
wbpcode
left a comment
There was a problem hiding this comment.
Thanks. And added a minor comment.
| ENVOY_STREAM_LOG(trace, | ||
| "ext_authz filter has {} response header(s) to add and {} response header(s) to " | ||
| "set to the encoded response:", | ||
| "ext_authz filter has {} response header(s) to add", | ||
| *encoder_callbacks_, response_headers_to_add_.size()); |
There was a problem hiding this comment.
May be we can just add response_headers_to_set_.size().
ENVOY_STREAM_LOG(trace,
"ext_authz filter has {} response header(s) to add and {} response header(s) to "
"set to the encoded response:",
*encoder_callbacks_, response_headers_to_add_.size(), response_headers_to_set_.size());
There was a problem hiding this comment.
+1 to adding the missing argument.
There was a problem hiding this comment.
Sure, good call. Done.
EDIT: Oh and confirmed that the log line does now appear when running ext_authz_test.
[2021-10-07 15:33:39.952][12][trace][filter] [source/extensions/filters/http/ext_authz/ext_authz.cc:162] [C0][S0] ext_authz filter has 1 response header(s) to add and 1 response header(s) to set to the encoded response:
Signed-off-by: Michael Leuchtenburg <mleuchtenburg@google.com>
|
/wait |
|
Thank you! Looks very good. The format precheck can be fixed with I'd recommend installing the git hooks with |
|
/wait |
Signed-off-by: Michael Leuchtenburg <mleuchtenburg@google.com>
|
Thanks! I'd have sworn that I did install the hooks with |
Signed-off-by: Michael Leuchtenburg mleuchtenburg@google.com
Commit Message: Fixes a broken log line. This message currently doesn't appear because the format is wrong.
Additional Description: This is hard to detect because Envoy doesn't use FMT_STRING, which would do compile-time checking of formats. It should be logged to stderr by default by spdlog, but I'm not seeing those logs anywhere when running the ext_authz tests.
Risk Level: low
Testing: Ran the ext_authz tests, verified that the log message appears.